#ifndef SAMPLESERVER_H
#define SAMPLESERVER_H

#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QHostAddress>
#include <QDebug>
#include <QMessageBox>

#include "ui_syncserver.h"
#include "syncmanager.h"
//==============
#include "phonebookdialog.h"
//==============

class SyncServer : public QWidget {

    Q_OBJECT

    public:
        SyncServer();
        ~SyncServer();
    signals:
		void addContactSignal(NeoPhoneBookEntry *entry);
		void replaceContactSignal(int contactIndex, NeoPhoneBookEntry *entry);
		void deleteContactSignal(int contactIndex);
		void callContactSignal(int contactIndex);
    private slots:
        void powerSwitch();
		void updateStatus(int status);
		void phoneBookDialogCloseListener();
		void showPhoneBookDialog();



    private:
        Ui_SyncServer *ui;
	bool powerOn;
	
	PhoneBookDialog *phoneBookDialog;
	SyncManager *syncManager;
};


#endif
